Skip to content

[python] fixes addProps sometimes breaks#14102

Merged
spacether merged 1 commit intoOpenAPITools:masterfrom
spacether:fix_issue_14078_addProps_break
Nov 23, 2022
Merged

[python] fixes addProps sometimes breaks#14102
spacether merged 1 commit intoOpenAPITools:masterfrom
spacether:fix_issue_14078_addProps_break

Conversation

@spacether
Copy link
Copy Markdown
Contributor

@spacether spacether commented Nov 23, 2022

[python] fixes addProps sometime breaks
Verification test added for model and property
This happened because schema baseNames were colliding when an items schema and an additionalProperties schema had identical schemas. When that happened, one (earlier processed) codegenProperty was returned from a cache.
I added the methods getAdditionalPropertiesName and getItemsName to provide these names and prevent collisions

Synonym PR for openapi-json-schema-tools/openapi-json-schema-generator#93

PR checklist

  • Read the contribution guidelines.
  • Pull Request title clearly describes the work in the pull request and Pull Request description provides details about how to validate the work. Missing information here may result in delayed response from the community.
  • Run the following to build the project and update samples:
    ./mvnw clean package 
    ./bin/generate-samples.sh
    ./bin/utils/export_docs_generators.sh
    
    Commit all changed files.
    This is important, as CI jobs will verify all generator outputs of your HEAD commit as it would merge with master.
    These must match the expectations made by your contribution.
    You may regenerate an individual generator by passing the relevant config(s) as an argument to the script, for example ./bin/generate-samples.sh bin/configs/java*.
    For Windows users, please run the script in Git BASH.
  • File the PR against the correct branch: master (6.3.0) (minor release - breaking changes with fallbacks), 7.0.x (breaking changes without fallbacks)
  • If your PR is targeting a particular programming language, @mention the technical committee members, so they are more likely to review the pull request.

@spacether spacether linked an issue Nov 23, 2022 that may be closed by this pull request
6 tasks
@spacether spacether changed the title [python] fixes addProps sometime breaks [python] fixes addProps sometimes breaks Nov 23, 2022
@spacether spacether added this to the 6.3.0 milestone Nov 23, 2022
@spacether spacether merged commit 3eb90a6 into OpenAPITools:master Nov 23, 2022
@spacether spacether deleted the fix_issue_14078_addProps_break branch November 23, 2022 14:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[BUG][Python] additionalProperties sometimes breaks

1 participant